﻿using DevExpress.Xpo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    public class B_Provider : BaseXPLiteObjectClass
    {
        public B_Provider(Session session) : base(session) { }
        public override void AfterConstruction()
        {
            base.AfterConstruction();
        }
        string fProviderID;
        [Key, Persistent]
        public string ProviderID
        {
            get { return fProviderID; }
            set { SetPropertyValue<string>("ProviderID", ref fProviderID, value); }
        }
        string fStoreID;
        public string StoreID
        {
            get { return fStoreID; }
            set { SetPropertyValue<string>("StoreID", ref fStoreID, value); }
        }
        string fProviderCode;
        public string ProviderCode
        {
            get { return fProviderCode; }
            set { SetPropertyValue<string>("ProviderCode", ref fProviderCode, value); }
        }
        string fProviderName;
        public string ProviderName
        {
            get { return fProviderName; }
            set { SetPropertyValue<string>("ProviderName", ref fProviderName, value); }
        }

        string fAddress;
        public string Address
        {
            get { return fAddress; }
            set { SetPropertyValue<string>("Address", ref fAddress, value); }
        }
        int fTypeID;
        public int TypeID
        {
            get { return fTypeID; }
            set { SetPropertyValue<int>("TypeID", ref fTypeID, value); }
        }
        int fOperatTypeID;
        public int OperatTypeID
        {
            get { return fOperatTypeID; }
            set { SetPropertyValue<int>("OperatTypeID", ref fOperatTypeID, value); }
        }
        decimal fSupplierBalance;
        public decimal SupplierBalance
        {
            get { return fSupplierBalance; }
            set { SetPropertyValue<decimal>("SupplierBalance", ref fSupplierBalance, value); }
        }
        decimal fCustomerBalance;
        public decimal CustomerBalance
        {
            get { return fCustomerBalance; }
            set { SetPropertyValue<decimal>("CustomerBalance", ref fCustomerBalance, value); }
        }
        //[Association("Provider-ProviderContact"), Aggregated]
        //public XPCollection<B_ProviderContact> ProviderContacts
        //{
        //    get { return GetCollection<B_ProviderContact>("ProviderContacts"); }
        //}
    }
}
